package com.flynn.rock.system.controller;

import com.flynn.rock.model.Response;
import com.flynn.rock.system.model.vo.LoginUserVo;
import com.flynn.rock.system.service.SysUserService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/user")
@Tag(name = "系统管理")
public class SysUserController {

    @Resource
    private SysUserService sysUserService;

    @GetMapping("/login/info")
    @Operation(summary = "获取当前登录用户信息")
    public Response<LoginUserVo> getLoginUserInfo() {
        return Response.success(sysUserService.getLoginUserInfo());
    }
}
